﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Castle.MicroKernel.Registration;
using Castle.MicroKernel.SubSystems.Configuration;
using Castle.Windsor;
using laba2.Entity;
using laba2.Repository.IRepository;
using laba2.Repository.RepositoryImpl;
using laba2.Services;

namespace laba2.IoC
{
    class Installer : IWindsorInstaller
    {
        public void Install(IWindsorContainer container, IConfigurationStore store)
        {
            //container.Register(Component.For<ICourseRepository>().ImplementedBy<CourseRepository>().LifeStyle.Singleton);
            container.Register(Classes.FromThisAssembly().BasedOn<ICourseRepository>());
            container.Register(Classes.FromThisAssembly().BasedOn<CourseService>());
        }
    }
}
